package com.woniu113.junk.order.config;

import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.HashMap;

@Configuration
public class RabbitMQConfig {
    @Bean
    public Queue orderCheckQueue(){
        HashMap<String, Object> map = new HashMap<>();
        map.put("x-message-ttl", 10 * 60 * 1000); // 10分钟
        return new Queue("order_check_queue",true,false,false,map);
    }
}
